#ifndef __SOKOBAN_H__
#define __SOKOBAN_H__

//#include "Renderer.h"
#include "hashtable.h"
#include "distancefilter.h"
//#include "tunnelfilter.h"
#include "boxstuckfilter.h"
#include "filter.h"
#include <vector>


namespace AI_SOKOBAN
{
	class Sokoban
	{
	public:
    Sokoban();
    std::string solve(Level& level);
  private:
    //Renderer* m_renderer;
    Hashtable m_table;
    bool* m_visited;
    Level* m_level;
    std::vector<Filter*> m_filters;
    int max_depth;
    Distancefilter* m_distancefilter;
    BoxStuckfilter* m_boxstuckfilter;
    //Tunnelfilter* m_tunnelfilter;

    void findAllMoves(const Level& current_state ,std::vector<Move>& moves, Move* move_that_led_here, bool* visited, int current_x, int current_y);
    void sortAndFilterMoves(const Level& level, std::vector<Move>& moves);
    std::string DFS_solver(Level level, Move* move_that_led_here, int depth);
    std::string backtrack_moves(Move* move);
    std::string BFS(const Level& startLevel,const Level& goalLevel, Move* move);
    bool check_if_win_condition(const Level& level);
    std::string IDA_Star(Level& level);
    std::pair<std::string,int> DFS(int start_cost, Level& level, int cost_limit, Move* move_that_led_here);
	
  };
}
#endif